import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import proj4 from 'proj4'
import { register } from 'ol/proj/proj4'

// 定义 CGCS2000 坐标系
proj4.defs('EPSG:4490', '+proj=longlat +ellps=GRS80 +no_defs +type=crs')
register(proj4)

const app = createApp(App)

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(ElementPlus)

// 添加全局样式
const style = document.createElement('style')
style.textContent = `
  * {
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }
`
document.head.appendChild(style)

app.mount('#app') 